package com.nb.hdj.page;

import com.alibaba.fastjson.JSONObject;
import com.nb.hdj.util.JsonDataSaveUtil;
import org.openqa.selenium.By;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 登录页元素
 * @Author: hedongjia
 * @Date: 2021/11/4 上午11:24
 * @Version: v1.0
 */
public class LoginPage {
    JsonDataSaveUtil jsonDataSaveUtil=new JsonDataSaveUtil();
    //首页登录地址
    private final String loginUrl="https://aim-test2-service.newbanker.work/amd";
    //首页欢迎登录标题
    private final String loginTitleElement="/html/body/section/div/div/div/div[2]/div[1]/div/div/div[2]";
    //账号框
    private final String userName="/html/body/section/div/div/div/div[2]/div[1]/div/div/div[3]/form/div[1]/div/div/div/input";
    //密码框
    private final String passWord="/html/body/section/div/div/div/div[2]/div[1]/div/div/div[3]/form/div[2]/div/div/div/input";
    //获取验证码按钮
    private final String yzmButton="/html/body/section/div/div/div/div[2]/div[1]/div/div/div[3]/form/div[3]/div/div/div[2]";
    //验证码框
    private final String yzm="/html/body/section/div/div/div/div[2]/div[1]/div/div/div[3]/form/div[3]/div/div/div[1]/input";
    //登录按钮
    private final String loginButton="/html/body/section/div/div/div/div[2]/div[1]/div/div/div[4]/button";
    public JSONObject getLoginPageElements(){
        jsonDataSaveUtil.saveData("loginUrl",loginUrl);
        jsonDataSaveUtil.saveData("loginTitleElement",loginTitleElement);
        jsonDataSaveUtil.saveData("userName",userName);
        jsonDataSaveUtil.saveData("passWord",passWord);
        return jsonDataSaveUtil.getSaveDataJson();
    }

}
